package com.kgc.smbms.service.impl;

import com.kgc.smbms.entity.Bill;
import com.kgc.smbms.mapper.BillMapper;
import com.kgc.smbms.service.BillService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service("billService")
public class BillServiceImpl implements BillService {
    @Resource
    private BillMapper billMapper;
    @Override
    /**
     * 根据条件查找对应账单
     */
    public List<Bill> selectBycondition(String productName, Integer providerId, Integer isPayment) {
        Map<String,Object> map = new HashMap<>();
        map.put("productName",productName);
        map.put("providerId",providerId);
        map.put("isPayment",isPayment);
        List<Bill> billList = billMapper.selectBycondition(map);
        return billList;
    }

    @Override
    public Bill getBillById(int id) {
        return null;
    }

    @Override
    public boolean checkCode(String billCode) {
        return false;
    }

    @Override
    public boolean addBill(Bill bill) {
        return false;
    }

    @Override
    public boolean update(Bill bill) {
        return false;
    }

    @Override
    public boolean delete(int id) {
        return false;
    }

    @Override
    public boolean checkCountByProviderId(int providerId) {
        return false;
    }
}
